package com.css.fxfzaqbz.constants;

import java.util.HashMap;
import java.util.Map;

public enum YNEnum {
    /**
     * 否
     */
    N("0"),
    /**
     * 是
     */
    Y("1");
    private String code;
    YNEnum(String code) {
        this.code = code;
    }
    @Override
    public String toString() {
        return String.valueOf(this.code);
    }
    private static final Map<String,YNEnum> stringToEnum = new HashMap<String,YNEnum>();
    static{
        for(YNEnum value:values()){
            stringToEnum.put(value.toString(),value);
        }
    }
    public static YNEnum fromString(String symbol){
        return stringToEnum.get(symbol);
    }
}
